<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="xdz" uri="/xdztools" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="${xdz:domain() }/css/bootstrap.min.css">
<link rel="stylesheet" href="${xdz:domain() }/css/plugins/morris/morris-0.4.3.min.css">
<link rel="stylesheet" href="${xdz:domain() }/css/font-awesome.min.css">
<link rel="stylesheet" href="${xdz:domain() }/css/kkpager_blue.css">
<link rel="stylesheet" href="${xdz:domain() }/css/parsley.css" >
<title>访问日志列表</title>
</head>
<body>
    <form action="../logReqBase/list" id="logReqBaseForm" method="post">
        <div class="panel panel-default">
        	<header class="panel-heading"><h3 class="panel-title">访问日志列表</h3></header>
        	<div class="panel-body">
        		<div class="row">
           			<div class="col-md-2">
    				<input type="text" name="page" value="${condition.page}" class="form-control input-sm" placeholder="请求地址" />
           			</div>
           			<div class="col-md-2">
    				<input type="text" name="account" value="${condition.account}" class="form-control input-sm" placeholder="使用用户" />
           			</div>
           			<div class="col-md-2">
    				<input type="text" name="ip" value="${condition.ip}" class="form-control input-sm" placeholder="请求者IP" />
           			</div>
           			<div class="col-md-2">
                  		<button class="btn btn-primary btn-sm" type="submit">查询</button>
           			</div>
        		</div>
            </div>
            <div class="table-responsive scroll-wrapper">
                        <table class="table table-striped table-hover table-condensed">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>请求地址</th>
                                    <th>请求参数</th>
                                    <th>使用用户</th>
                                    <th>请求时间</th>
                                    <th>请求者IP</th>
                                </tr>
                            </thead>
                            <tbody>
                                <c:forEach var="list" items="${list }">
                                    <tr>
                                        <td>${list.id }</td>
                                        <td>${list.page }</td>
                                        <td>${list.params }</td>
                                        <td>${list.account }</td>
                                        <td>${list.strReqtime }</td>
                                        <td>${list.ip }</td>
                                </c:forEach>
                            </tbody>
                        </table>
            </div>
            <div class="panel-footer">
                  <div id="kkpager"></div>
            </div>
    	</div>
    </form>
    <script src="${xdz:domain() }/js/jquery.min.js"></script>
    <script src="${xdz:domain() }/js/bootstrap.min.js"></script>
    <script src="${xdz:domain() }/js/plugins/layer/layer.min.js"></script>
    <script src="${xdz:domain() }/js/kkpager.min.js"></script>
    <script src="${xdz:domain() }/js/pagination.js"></script>
    <script type="text/javascript">
		kkpager.generPageHtml({
			pno : '${extQuery.pageNum }',
			mode : 'click', //设置为click模式
			//总页码
			total : '${extQuery.totalPage}',
			//总数据条数 
			totalRecords : '${extQuery.total}',
			//点击页码、页码输入框跳转、以及首页、下一页等按钮都会调用click
			//适用于不刷新页面，比如ajax
			click : function(n){
				//这里可以做自已的处理
				//...
				this.selectPage(n);
				toPage(n, '${extQuery.totalPage}', 'logReqBase');
				this.selectPage(n);
				//处理完后可以手动条用selectPage进行页码选中切换

			},
			//getHref是在click模式下链接算法，一般不需要配置，默认代码如下
			getHref : function(n){
				return '#';
			}

		});
    </script>
</body>
</html>
